<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <script th:src="@{/jquery-3.4.1/jquery-3.4.1.min.js}"></script>

    <style>
        .layui-table-cell {
            height: 120px;
            line-height: 120px;
            font-size: 24px;
        }

        th .layui-table-cell {
            height: 50px;
            line-height: 50px;
        }
    </style>
</head>
<body>
<div class="layui-fluid">
    <fieldset class="layui-elem-field layuimini-search">
        <legend>已完成</legend>
        <div style="margin: 10px 10px 10px 10px">
            <table class="layui-hide" id="FinishTask"></table>
        </div>
    </fieldset>
</div>
<!--<div class="layui-fluid">
    <fieldset class="layui-elem-field layuimini-search">
        <legend>超时完成</legend>
        <div style="margin: 10px 10px 10px 10px">
            <table class="layui-hide" id="OverTimeFinishTask"></table>
        </div>
    </fieldset>
</div>-->
<script th:src="@{/layui/layui.js}"></script>
<script type="text/javascript" th:inline="javascript">
    layui.use(['table', 'jquery'], function () {
        var table = layui.table;
        var $ = layui.jquery;
        var username = /*[[${session.user.name}]]*/ "用户名称";
        table.render({
            elem: '#FinishTask'
            , url: '/task/FinishTask/' + username
            , cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
            , skin: 'nob'
            , cols:
                [
                    [
                        /*{field: 'name', width: '15%', title: '任务人', sort: true, align: 'center'}*/
                        {field: 'id', width: '25%', title: '零件编号', sort: true, align: 'center'},
                        {field: 'monovalent', width: '25%', title: '零件单价', align: 'center'}
                        /*{field: 'status', width: '15%', title: '任务状态', align: 'center'}*/
                        ,
                        {
                            field: 'createTime', width: '25%', title: '任务创建时间', align: 'center',
                            templet: "<div>{{d.createTime == null ? '' : layui.util.toDateString(d.createTime, 'yyyy-MM-dd ')}}</div>",
                        }
                        ,
                        {
                            field: 'finishTime', width: '25%', title: '任务结束时间', sort: true, align: 'center',
                            templet: "<div>{{d.finishTime == null ? '' : layui.util.toDateString(d.finishTime, 'yyyy-MM-dd ')}}</div>"
                        }
                    ]
                ]
        });
    });
</script>
<!--<script type="text/javascript" th:inline="javascript">
    layui.use(['table', 'jquery'], function () {
        var table = layui.table;
        var $ = layui.jquery;
        var username = /*[[${session.user.name}]]*/ "用户名称";
        table.render({
            elem: '#OverTimeFinishTask'
            , url: '/task/OverTimeFinish/' + username
            , cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
            , skin: 'nob'
            , cols:
                [
                    [
                        {field: 'name', width: '15%', title: '任务人', sort: true, align: 'center'}
                        ,
                        {field: 'id', width: '15%', title: '零件编号', sort: true, align: 'center'}
                        ,
                        {field: 'monovalent', width: '15%', title: '零件单价', align: 'center'}
                        ,
                        {field: 'status', width: '15%', title: '任务状态', align: 'center'}
                        ,
                        {
                            field: 'createTime', title: '任务创建时间', width: '20%', align: 'center',
                            templet: "<div>{{d.createTime == null ? '' : layui.util.toDateString(d.createTime, 'yyyy-MM-dd HH:mm:ss')}}</div>",
                        }
                        ,
                        {
                            field: 'finishTime', width: '20%', title: '任务结束时间', sort: true, align: 'center',
                            templet: "<div>{{d.finishTime == null ? '' : layui.util.toDateString(d.finishTime, 'yyyy-MM-dd HH:mm:ss')}}</div>"
                        }
                    ]
                ]
        });
    });
</script>-->
</body>

</html>